So there's two major ways
that we use inheritance. One is specialization, I'm like my parent,
but I want to be different in some ways so specialized I could add attributes. I could override inherited methods. So for example if you have a person class,
and a person has a first and last name and a method to get your initials
from that first and last name. You could create an employee
class that inherits from person. An employee is a kind of person and
you could add the attribute ID. And then if you had several classes
that have the same attributes, you can pull out a parent class
that's called generalization. What's the generalization
of those specific children? And so for example if we were the State
department collecting fees on vehicles, we might have cars and
trucks that had an ID and a color. We could pull those attributes out into a
vehicle class that has an ID and color and method fees. And then you could override the fees for
cars and trucks. Maybe trucks are more expensive. So two major uses of inheritance,
specialization and generalization.